﻿using Dapper.Contrib.Extensions;
using System.Data.SQLite;

namespace Labthink.PCSoft.UniversalHost4.DataAccess
{
    public class SqLiteBaseRepository
    {
        public static SQLiteConnection HostDbConnection()
        {
            SqlMapperExtensions.TableNameMapper = type => type.Name;
            return new SQLiteConnection("Data Source=");// + Global.Instance.UserHostDb);
        }

        public static SQLiteConnection EqptDbConnection()
        {
            //SqlMapperExtensions.TableNameMapper = type => type.Name;
            return new SQLiteConnection("Data Source=");// + Global.Instance.UserEqptDb);
        }

        public static SQLiteConnection TestDbConnection(string dbPath)
        {
            //SqlMapperExtensions.TableNameMapper = type => type.Name;
            return new SQLiteConnection("Data Source=" + dbPath);
        }
    }
}
